package org.javaweb.cms_web.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.javaweb.cms_web.model.UserPermission;

import java.util.List;

@Mapper
public interface PermissionMapper {
    void deletePermissionsByUserId(@Param("userId")int userId);

    void addPermissionForUser(@Param("userId") int userId, @Param("permissionType") int permissionType);

    List<UserPermission> getPermissionsByUserId(@Param("userId")int userId);
}
